package com.smart.car.record.client.fallback;

import com.smart.car.common.res.bean.ResponseResult;
import com.smart.car.record.client.BillFeignClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestParam;

/**
 *
 * finance服务快速失败策略
 */
@Slf4j
@Component
public class BillServiceFallback implements BillFeignClient {

	@Override
	public ResponseResult<Integer> create(@RequestParam("json") String json) {
		ResponseResult<Integer> result = new ResponseResult<>();
		result.setMsg("finance服务远程调用失败!");
		result.setData(-1);
		log.warn("触发了finance服务的failback策略...");
		return result;
	}

}
